<script lang="ts" setup>
const cilckHandle = () => {
  alert('点击成功')
}
const onMouseEnter = () => {
  console.log('鼠标进入')
}
const onMouseleave = () => {
  console.log('鼠标离开')
}

</script>

<template>
  <button @click="cilckHandle">点击</button>
  <div class="box" @mouseenter="onMouseEnter()" @mouseleave="onMouseleave()">
    鼠标进入和离开
  </div>
</template>

<style scoped>
.box {
  width: 100px;
  height: 100px;
  background-color:pink;
}
</style>
